<%--
 *  File:    ActivityManageFrm.jsp
 *  @Author: DC
 *  Date:    2011/09/13
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license Distributortender you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom-tag.tld" prefix="custom" %>

<% //--------------------------------------  setting logger --%>

<%
  Category cat = Category.getInstance("jsp.ActivityManageFrm");
  //init param
  String privilegeCode = "SFE0150";
  String strModuleName = "CRM";
  String pageName = "p_activityamagefrm";
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/InitEdit.inc" %>
<%@ include file="/inc/FrmDefault.inc" %> 
<html>
<head>
<title>ActivityManageFrm</title>
<PageFlow:CheckPageFlow pageName="p_activityamagefrm"/>
<%  
    String viewflag = "";
         if (pageContext.getAttribute("viewflag")!=null&&"view".equals((String)pageContext.getAttribute("viewflag"))) {
            viewflag = "&viewflag=view";
        }else{
            viewflag = "&viewflag=";
         }
         


    String strIsDefault = (String)pageContext.getAttribute("isdefault");
	if("Y".equals(pageContext.getAttribute("isdefault"))) {
		strIsDefault = "&isdefault=Y";
	}else if ("N".equals(pageContext.getAttribute("isdefault"))) {
		strIsDefault = "&isdefault=N";
	}else  {
		strIsDefault = null;
	}
	String activitymanageid = null;
	if(pageContext.getAttribute("activitymanageid") != null) {
		activitymanageid=((Integer)pageContext.getAttribute("activitymanageid")).toString();
	}
    activitymanageid=(activitymanageid==null)?"":("&activitymanageid="+activitymanageid);
    
    
    
    
	String status = null;
	if(pageContext.getAttribute("status") != null) {
		status=((Integer)pageContext.getAttribute("status")).toString();
	}
	status=(status==null)?"":("&status="+status);
	

	String optionvalue = null;

 	if(pageContext.getAttribute("optionvalue") != null) {
		optionvalue=((Integer)pageContext.getAttribute("optionvalue")).toString();
	}else{
		optionvalue=(String)(request.getParameter("optionvalue"));
	}
 	
 	optionvalue=(optionvalue==null)?"":("&optionvalue="+optionvalue);
 	
	if(session.getAttribute("optionvalue")  != null) {
	
		optionvalue=((Integer)session.getAttribute("optionvalue")).toString();
	}

	System.out.print("_____________________________________________________frm"+(Integer)pageContext.getAttribute("optionvalue"));
	String activityconfigid = null;
	if(pageContext.getAttribute("activityconfigid") != null) {
		activityconfigid=((Integer)pageContext.getAttribute("activityconfigid")).toString();
	}
	activityconfigid=(activityconfigid==null)?"":("&activityconfigid="+activityconfigid);
	
    
	
	//活动影响结束时间
	String influencedate = null;
	if(pageContext.getAttribute("influencedate") != null) {
		influencedate=((Date)pageContext.getAttribute("influencedate")).toString();
	}
	influencedate=(influencedate==null)?"":("&influencedate="+influencedate);
	
	//活动准备开始时间
	String readystartdate = null;
	if(pageContext.getAttribute("readystartdate") != null) {
		readystartdate=((Date)pageContext.getAttribute("readystartdate")).toString();
	}
	readystartdate=(readystartdate==null)?"":("&readystartdate="+readystartdate);
	
	//活动开始时间
	String startdate = null;
	if(pageContext.getAttribute("startdate") != null) {
		startdate=((Date)pageContext.getAttribute("startdate")).toString();
	}
	startdate=(startdate==null)?"":("&startdate="+startdate);
	
	//活动结束时间
	String enddate = null;
	if(pageContext.getAttribute("enddate") != null) {
		enddate=((Date)pageContext.getAttribute("enddate")).toString();
	}
	enddate=(enddate==null)?"":("&enddate="+enddate);
 	
 	//System.out.print(influencedate+"1");
 	//System.out.print(readystartdate+"2");
 	//System.out.print(startdate+"3");
 	//System.out.print(enddate+"4");
 	//System.out.print(activityconfigid+"5");
 	//System.out.print(activitymanageid+"6");
 	
    
    
    String isNew = (String)pageContext.getAttribute("isNew");
	if("Y".equals((String)pageContext.getAttribute("isNew"))) {
		isNew = "&isNew=Y";
	}else if ("N".equals((String)pageContext.getAttribute("isNew"))) {
		isNew = "&isNew=N";
	}else  {
		isNew = null;
	}

	
	java.text.DateFormat df=new java.text.SimpleDateFormat("yyyy-MM-dd");      
    Calendar calendar = new GregorianCalendar();
    java.util.Date trialTime = new java.util.Date();
    calendar.setTime(trialTime);
    int year = calendar.get(Calendar.YEAR);
    int month = calendar.get(Calendar.MONTH)+1;
    int day = calendar.get(Calendar.DAY_OF_MONTH);
    
    
    //System.out.println("用Calendar获得日期是：" + year +"年"+ month +"月"+ day + "日");
    
    //System.out.println(pageContext.getAttribute("startdate"));
    
	String isdetail = (String)pageContext.getAttribute("isdetail");
	String strurl = null;
	if("Y".equals((String)pageContext.getAttribute("isdetail"))) {
		strurl = "ActivityManageBaseDetail.jsp?"+OvalTools.randomURL()+"&languagecode="+JspHelper.filterNull( strFrmLanguageCode )+JspHelper.filterNull( activitymanageid)+JspHelper.filterNull(activityconfigid)+JspHelper.filterNull( strIsDefault)+JspHelper.filterNull(isNew)+JspHelper.filterNull(viewflag);
	}else{
		strurl = "ActivityManageEdit.jsp?"+OvalTools.randomURL()+ "&languagecode="+JspHelper.filterNull( strFrmLanguageCode )+JspHelper.filterNull( strIsDefault)+JspHelper.filterNull(activitymanageid)+JspHelper.filterNull(activityconfigid)+JspHelper.filterNull(isNew)+JspHelper.filterNull(viewflag)+JspHelper.filterNull(startdate)+JspHelper.filterNull(enddate)+JspHelper.filterNull(influencedate)+JspHelper.filterNull(readystartdate)+JspHelper.filterNull(status)+JspHelper.filterNull(optionvalue);
		//alert(strurl);
		//out.print(strurl);
	}

%>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<frameset rows="70,*" frameborder="YES" border="0" framespacing="0" cols="*" bordercolor="#999999">

  <frame name="up" src="ActivityManageHeaderEdit.jsp?<%= OvalTools.randomURL() %>&languagecode=<%=JspHelper.filterNull( strFrmLanguageCode )%>&strIsDefault=<%=JspHelper.filterNull( strIsDefault)%><%=JspHelper.filterNull(activitymanageid)%><%=JspHelper.filterNull(activityconfigid)%>&isNew=<%=JspHelper.filterNull(isNew)%>&viewflag=<%=JspHelper.filterNull(viewflag)%>&startdate=<%=JspHelper.filterNull(pageContext.getAttribute("startdate"))%>&enddate=<%=JspHelper.filterNull(pageContext.getAttribute("enddate"))%>&readystartdate=<%=JspHelper.filterNull(pageContext.getAttribute("readystartdate"))%>&influencedate=<%=JspHelper.filterNull(pageContext.getAttribute("influencedate"))%><%=JspHelper.filterNull(optionvalue)%><%=JspHelper.filterNull(status)%>" frameborder="NO" scrolling="NO">
 
  <frame name="down" src="<%=JspHelper.filterNull( strurl)%>" scrolling="yes" frameborder="NO" noresize >
</frameset>
<noframes> 
<body>
</body>
</noframes> 
</html>


